package com.ys.ylideas.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ys.ylideas.dao.AccountDao;
import com.ys.ylideas.entity.BaiUserContact;
import com.ys.ylideas.entity.UserEntity;
import com.ys.ylideas.service.AccountService;


@Service("accountService")
public class AccountServiceImpl implements AccountService {

	@Autowired
	private AccountDao accountDao;
	
	@Override
	public List<UserEntity> checkAccount(long identifier) {
		// TODO Auto-generated method stub
		return accountDao.checkAccount(identifier);

	}

	@Override
	public void save(UserEntity userEntity) {
		// TODO Auto-generated method stub
		accountDao.save(userEntity);
	}

	@Override
	public void update(UserEntity userEntity) {
		// TODO Auto-generated method stub
		accountDao.update(userEntity);
	}

	@Override
	public String getUserToken(long userId) {
		// TODO Auto-generated method stub
		return accountDao.getUserToken(userId);
	}

	@Override
	public boolean saveForService(BaiUserContact e) {
		// TODO Auto-generated method stub
		return accountDao.saveForService(e);
	}
	
	@Override
	public List<Long> getAllUserId() {
		// TODO Auto-generated method stub
		return accountDao.getAllUserId();
	}
	
	@Override
	public UserEntity getUserById(Long id) {
		// TODO Auto-generated method stub
		return accountDao.getUserById(id);
	}
	
	@Override
	public void updateRFTokenByUserId(Map<String,Object> map) {
		// TODO Auto-generated method stub
		accountDao.updateRFTokenByUserId(map);
	}

}
